package jou.cs.entity;

import jou.cs.SQL_str_size;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity @Builder @Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_comment")
public class TComment {
    // 景点评论 或者 动态帖子
    @Id
    private Long id;

    private Long uid; // user
    private Long pid; // place
    private Long tid; // type

    @Lob
    private String text;
    @CreationTimestamp
    private Timestamp createTime;
    @Column(length = SQL_str_size.medium)
    private String title;

}
